package top.moonkit.rs_pro.config;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.mybatisflex.core.keygen.IKeyGenerator;

/**
 * @author moon
 * @since
 */
public class SnowKeyGenerator implements IKeyGenerator {

    private final Snowflake snowflake = IdUtil.getSnowflake();

    @Override
    public Object generate(Object o, String s) {
        return snowflake.nextId();
    }
}
